package com.phantasy.common
{
	import com.phantasy.proto.p_role_data;

	/**
	 * 全局对象管理器 
	 * @author Liseen
	 * 
	 */	
	public class GlobalObjectManager
	{
		public static var GAME_WIDTH:int = 1000;
		public static var GAME_HEIGHT:int = 545;
		
		public var totaltm:int;
		public var passfcm:Boolean;
		private static var _instance:GlobalObjectManager;
		
		private var _user:p_role_data;
		
		public function GlobalObjectManager()
		{
		}
		
		public static function getInstance():GlobalObjectManager
		{
			if(_instance==null){
				GlobalObjectManager._instance = new GlobalObjectManager();
			}
			
			return GlobalObjectManager._instance;
		}
		/**
		 * 获取user
		 * @return 
		 * 
		 */		
		public function get user():p_role_data
		{
			return this._user;
		}
		
		public function getFamilyID():Number
		{
			return this.user.base.family_id;
		}
		/**
		 * 设置user
		 * @param roleData
		 * 
		 */		
		public function set user(roleData:p_role_data):void
		{
			this._user = roleData;
		}
	}
}